#ifndef BLOCKIMPL_H
#define BLOCKIMPL_H
#include<vector>
#include<list>
#include"common.hpp"


/*
 * bridge pattern for the different block implement!!
 * function of BlockImpl contains :
 * 	1.the factory that producte
 * concrete node;
 */

class NodeSequence;
class Node;
class BlockImpl{
friend class  RegionBuilder;
protected:
	enum BLKType bolck_type;	
	struct FlowInfo{
		virtual FlowInfo *get_next()const= 0;
		virtual int get_src_id() const = 0;
		virtual int get_dest_id() const = 0;
	};
public:
	virtual FlowInfo* get_dest_flow()const = 0;
	virtual FlowInfo* get_src_flow()const =0;
	virtual int getID()const = 0;
	virtual enum BLKType get_block_type()const = 0;
	virtual void build_nodelist(NodeSequence &nodelist) = 0 ;

	virtual ~BlockImpl(){;}
};


#endif
